package rothag.views.help;

import java.awt.Color;
import java.io.IOException;
import java.net.URL;
import javax.swing.JEditorPane;
import rothag.graphics.GraphicsHelper;
import rothag.graphics.GraphicsParameters;

/**
 * Classe permettant d'afficher l'aide
 * @author Gaetan
 */
public class HelpJEditorPane extends JEditorPane {

    public HelpJEditorPane() {
        setEditable(false);
        URL path = getClass().getResource(GraphicsParameters.pathHelp);
        setContentType("text/html");
        try {
            setPage(path);
        } catch (IOException ex) {
            GraphicsHelper.afficherErreur("Erreur", "Impossible de trouver le fichier d'aide : " + path.toString(), this).setVisible(true);
        }
    }
}
